<script setup lang="ts">
import { init } from "@/core/Game";
import { onMounted, ref } from "vue";
const canvas = ref<any>(null);
const txt = ref<any>(null);

onMounted(() => {
    console.log("this", this);
    canvas.value.width = window.innerWidth;
    canvas.value.height = window.innerHeight;
    init(canvas.value, txt.value);
});
</script>

<template>
    <canvas ref="canvas"></canvas>
    <div class="txt" ref="txt">BTC</div>
</template>

<style lang="less" scoped>
canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}
body {
    width: 100vw;
    height: 100vh;
    --text-color: rgb(43, 43, 43);
}
.txt {
    position: fixed;
    top: -30px;
    left: 0;
    pointer-events: none;
    z-index: 1;
    font-size: 14px;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    width: fit-content;
    padding: 8px;
    /* text-shadow: -1px -1px 0 var(--text-color), 1px -1px 0 var(--text-color), -1px 1px 0 var(--text-color), 1px 1px 0 var(--text-color); */
}
</style>
